#!/bin/sh
#update this to your path
TOMCAT_BIN_PATH=PATH_TO_TOMCAT_BIN
if [ $# -lt 2 ]; then
  echo "Usage: run_cubooks.sh [password] [start|stop]"
  exit
fi

if [ $2 == 'start' ]; then
  export CUBOOKS_ENCRYPTION_PASSWORD=$1
  ${TOMCAT_BIN_PATH}startup.sh
fi

if [ $2 == 'stop' ]; then
  ${TOMCAT_BIN_PATH}shutdown.sh
fi